package com.skywolf.chem.match.common.constants;

/**
 * 基础配置
 *
 * @Author sj
 * Date on 2021/9/26  15:58
 * @Version 1.0
 */
public interface MatchConstants {

    /**
     * 业务序列号
     */
    String BUSINESS_NO_PREFIX = "business_no:";


    /**
     * 用户添加报名人信息redis key
     */
    String APPLY_USER_INFO_KEY = "apply:user:info:";


    /**
     * 释放锁lua脚本
     */
    String RELEASE_LOCK_LUA_SCRIPT = "if redis.call('get', KEYS[1]) == ARGV[1] then return redis.call('del', KEYS[1]) else return 0 end";


    /**
     * 订单业务编号
     */
    Integer ORDER_SN = 2401;


    /**
     * 订单redis token前缀
     */
    String ORDER_TOKEN_PREFIX = "order:token:";


    /**
     * 锁定库存
     */
    String LOCKED_STOCK_PREFIX = "stock:locked:";


    /**
     * 组别库存分布式锁
     */
    String LOCK_SKU_PREFIX = "lock:group:";

    /**
     * 订单支付分布式锁
     */
    String ORDER_SN_PREFIX = "order:sn:";


    /**
     * 微信支付重复回调
     */
    String ORDER_NOTIFY_PREFIX="order:notify:";

    /**
     * 支付退款重复回调
     */
    String REFUND_NOTIFY_PREFIX="refund:notify:";
}
